package com.yumeng.common.auth;

import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.stereotype.Component;

/**
 *
 * @author wxd
 * @date 2025/9/22 14:44
 */
@Component
public abstract class AbsAuthHelper {

    /**
     * 获取当前认证信息
     *
     * @return
     */
    protected abstract BaseAuthInfo doGetCurrAuthInfo(boolean strict);

    /**
     * 打印认证框架信息
     *
     * @param context
     */
    protected abstract void printAuthFrameInfo(ConfigurableApplicationContext context);

    /**
     * 异常是否需要直接抛出
     *
     * @param ex
     * @return
     */
    protected abstract boolean needThrowException(Exception ex);
}
